<div ng-controller="PostfeeCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li>{{'邮费'| translate}}</li>
        <li>{{'List'|translate}}
            <a href="#/postfee/add" id="addNew" class="sui-btn btn-primary">+{{'add_new' | translate}}</a>
        </li>
        <span class="sui-form sui-form pull-right">

        </span>
    </ul>
    <table class="sui-table table-bordered" ng-repeat="list in fare_temp">
        <thead>
            <tr>
                <th colspan="6">
                    <label class="checkbox pull-left">
                        {{list.name}}
                        {{list.is_incl_postage==1?"(此邮费模板为包邮模板)":""}}
                    </label>
                    <span class="pull-right">
                        <a href="#/postfee/add?fare_id={{list.fare_id}}" class="sui-btn btn-primary">{{'edit'|translate}}</a>

                        <button ng-click="postfeeDelete(list.fare_id)" class="sui-btn btn-danger">{{'delete'|translate}}</button>
                    </span>
                </th>
            </tr>
        </thead>
        <tbody>
            <tr ng-show="list.is_incl_postage==2">
                <td>运送方式</td>
                <td>运送到</td>
                <td>
                    {{list.valuation_model == 1?"首件(件)":(list.valuation_model == 2?"首重(千克)":"首体积(立方米)")}}
                </td>
                <td>运费(元)</td>
                <td>
                    {{list.valuation_model == 1?"续件数(件)":(list.valuation_model == 2?"续重(千克)":"续体积(立方米)")}}
                </td>
                <td>续费(元)</td>
            </tr>
            <tr ng-show="list.is_incl_postage==2" ng-repeat="(key, value) in list.carry_modes">
                <td>{{value.carry_way == "express"?"快递":value.carry_way == "ems"?"EMS":value.carry_way == "post"?"平邮":""}}
                </td>
                <td style="width: 60%;">
                    {{value.region==1?'全国':'部分城市'}}
                    <!-- <city-name ng-model="value.region"></city-name> -->
                </td>
                <td>{{value.first_piece}}</td>
                <td>{{value.first_amount?value.first_amount:0}}</td>
                <td>{{value.second_piece}}</td>
                <td>{{value.second_amount?value.second_amount:0}}</td>
            </tr>
        </tbody>
    </table>

    <!-- 分页start -->
    <pager page-no="1" page-size="pageSize" total="total_count" get-data="getList(pageNo)"></pager>
    <!-- 分页end -->
</div>